package Java.j2;

import java.util.Scanner;

public class AcWing_660 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();

        System.out.print("Total: R$ ");
        if(x==1){
            System.out.printf("%.2f", (float)y*4);
        }else if(x==2){
            System.out.printf("%.2f", (float)y*4.5);
        }else if(x==3){
            System.out.printf("%.2f", (float)y*5);
        }else if(x==4){
            System.out.printf("%.2f", (float)y*2);
        }else if(x==5){
            System.out.printf("%.2f", (float)y*1.5);
        }
    }
}
